package com.devilvan.betrice.bilibili.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.devilvan.betrice.common.BasePo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Table;
import java.io.Serial;
import java.io.Serializable;

/**
* @author Evad.Wu
* @Description Bilibili-用户信息表 映射
* @date 2022-12-22
*/
@Setter
@Getter
@ToString
@NoArgsConstructor
@Accessors(chain = true)
@TableName(value = "BILIBILI_MEMBER")

@Entity
@Table(name = "BILIBILI_MEMBER")
@DynamicInsert
@EntityListeners(AuditingEntityListener.class)
@Schema(description = "Bilibili-用户信息表 映射")
public class BilibiliMemberPo extends BasePo implements Serializable {
    @Serial
    private static final long serialVersionUID = -3291241670515829796L;
    @Schema(description = "用户ID")
    @TableField(value = "MID")
    @Column(name = "MID", columnDefinition = "BIGINT(19) COMMENT '用户ID'")
    private Long mid;
    @Schema(description = "用户名")
    @TableField(value = "NAME")
    @Column(name = "NAME", columnDefinition = "VARCHAR(64) COMMENT '用户名'")
    private String name;
    @Schema(description = "性别")
    @TableField(value = "SEX")
    @Column(name = "SEX", columnDefinition = "VARCHAR(8) COMMENT '性别'")
    private String sex;
    @Schema(description = "个人签名")
    @TableField(value = "SIGN")
    @Column(name = "SIGN", columnDefinition = "TEXT(65,535) COMMENT '个人签名'")
    private String sign;
    @Schema(description = "等级")
    @TableField(value = "LEVEL")
    @Column(name = "LEVEL", columnDefinition = "INT(10) COMMENT '等级'")
    private Integer level;
}
